Update to rails 7.1 #9
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request upgrades the application from Rails 6.1 to Rails 7.1, updates related dependencies, and makes several configuration adjustments to ensure compatibility with the new Rails version. The most important changes are grouped below.
Rails and Dependency Upgrades:
6.1.3
to7.1.0
in theGemfile
, updatedpuma
to~> 6.0
, addedwebrick
, and set Ruby version to3.3.5
. Also adjusted the platform fortzinfo-data
to match Windows and JRuby. [1] [2]db/migrate/20250820144718_create_puppies.rb
to inherit fromActiveRecord::Migration[7.1]
instead of6.1
.Configuration Adjustments for Rails 7.1:
config.load_defaults
from6.1
to7.1
and setconfig.active_support.cache_format_version = 7.1
inconfig/application.rb
.config.action_dispatch.show_exceptions = :none
for Rails 7.1 compatibility.RSpec and Test Suite Updates:
rails_helper
instead ofspec_helper
in.rspec
and reordered options.rspec-rails
to~> 6.0.0
in theGemfile
and made related changes inspec/rails_helper.rb
for compatibility, including usingrequire_relative
for environment loading, improved error handling for pending migrations, and updated documentation links. [1] [2] [3] [4]require 'rspec/json_expectations'
and updated documentation links inspec/spec_helper.rb
. [1] [2] [3]Other Notable Changes:
config/environments/development.rb
and forgery protection inapp/controllers/application_controller.rb
. [1] [2]